package com.ls.pattern.factory.simple.calculate.cal;

public class Div implements ICalculate {
    @Override
    public Double calculate(Double a, Double b) {
        if (b == null) {
            throw new RuntimeException("除数不能为0。");
        }
        return a / b;
    }
}
